home *** CD-ROM | disk | FTP | other *** search
Gui4CLI script | 1980-01-03 | 1.8 KB | 61 lines |
- G4C
-
- ; MULTISELECT LISTVIEWS
-
- ; This is an example of multiselect listviews.
- ; Here again we have to give a file name which the listview will
- ; display.
-
- ; We'll display the "guis:docs/printme" file in one and nothing in
- ; the other. The buttons transfers the selected lines
-
-
- WINBIG -1 -1 412 192 ListViews2.gc
- WinType 11110001
-
- xOnLoad
- GuiOpen ListViews2.gc
-
- xOnClose
- GuiQuit ListViews2.gc
-
-
- ; -------------------- Our listviews
-
- ; Note that a multiselect lv will "happen" whenever the user double
- ; clicks on an item. Here, we'll not do anything when the user
- ; double clicks.. (that's why the lv's don't have any commands attached)
-
- ; The left side listview
-
- XLISTVIEW 4 2 225 188 "" left.lv "guis:docs/printme" 10 MULTI
- gadid 1
-
-
- ; The right side listview (no file)
-
- XLISTVIEW 233 26 175 164 "" right.lv "" 10 MULTI
- GadID 2
-
- ; -------------------- The button transfers the selected items..
-
- ; to do this we have to use the lvmulti command to see which of the
- ; lines in the left listview have been selected. We use the internal
- ; variables to get our results - yes.. go read all about them..
-
-
- XBUTTON 232 3 119 20 "Copy --->>"
- lvuse listviews2.gc 1 ; use the left listview
- lvmulti first ; get the first selected record
- while $$lv.line > '' ; while there *are* selected items
- dummy = $$lv.rec ; store the selected line into a variable
- lvuse listviews2.gc 2 ; use the other listview
- lvadd $dummy ; append the line to it
- lvuse listviews2.gc 1 ; use our listview again
- lvmulti off ; unselect the line we just transfered
- lvmulti next ; get the next selected line
- endwhile ; .. until there are no more - i.e., until
- ; the $$lv.line internal variable = ''
-
-
-